var wt = {
                eventAll:{
                    //"事件名称"：[事件执行的函数1，2，3]
                },
                addEvent:function(eventName,fn){
                    if(this.eventAll[eventName]==undefined){
                        this.eventAll[eventName] = [];
                    };
                    this.eventAll[eventName].push(fn);

                },
                emit:function(eventName,eventMsg){
                    if(this.eventAll[eventName] != undefined){
                         this.eventAll[eventName].forEach(function(item,i){
                        item(eventMsg);
                          });
                    };        
                },
                removeEvent:function(eventName,fn){
                    var that = this;
                    this.eventAll[eventName].forEach(function (item, i) {
                        if(item == fn){
                            that.eventAll[eventName].splice(i,1);
                        }
                    });
                },
                init:function(dom){
                    dom.eventAll = {};
                    dom.addEvent = this.addEvent;
                    dom.emit = this.emit;
                    dom.removeEvent = this.removeEvent;
                    dom.touchData = {};

                    dom.addEventListener("touchstart",function(e){
                        this.touchData.startX = e.touches[0].pageX;
                        this.touchData.startY = e.touches[0].pageY;
                    });
                    dom.addEventListener("touchmove",function(e){
                        this.touchData.endX = e.touches[0].pageX;
                        this.touchData.endY = e.touches[0].pageY;
                    });
                    dom.addEventListener("touchend",function(e){
                        var x= this.touchData.endX - this.touchData.startX;
                        var y = this.touchData.endY - this.touchData.startY;
                        if((Math.abs(x) > Math.abs(y))&&Math.abs(x)>100){
                            if(x>0){
                                this.emit("swiperRight",e);
                            }else{
                                this.emit("swiperLeft",e);
                            }
                        }else if((Math.abs(x) < Math.abs(y))&&Math.abs(y)>100){
                            if(y>0){
                                this.emit("swiperBottom",e);
                            }else{
                                this.emit("swiperTop",e);
                            };
                        };
                    });
                }
        };
            
            